package org.example.weather.bigscreen.portal.client;

import org.example.weather.bigscreen.portal.dto.BaiduWeatherResponseDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created on 2022-07-22.
 *
 * @author chenyu
 */
@FeignClient(
        name = "${rpc.baidu.weather.name:baidu-weather}",
        url = "${rpc.baidu.weather.name:http://api.map.baidu.com}",
        configuration = BaiduWeatherConfiguration.class
)
public interface BaiduWeatherClient {
    @GetMapping(path = "/weather/v1/")
    BaiduWeatherResponseDTO fetchWeather(@RequestParam("district_id") String districtId, @RequestParam("data_type") String dataType, @RequestParam("ak") String ak);
}
